/**
 * 2025/01/01 - 2025/12/31
 */
package com.snail.starter.utils.condition;

import com.snail.starter.commons.enums.ApplicationModelEnum;
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;

/**
 *
 * @author zgadmin
 * @date 2025/8/27 10:11
 *
 */
public class ClusterCondition implements Condition {

    @Override
    public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
        return ApplicationModelEnum.CLUSTER.getCode().toString().equals(context.getEnvironment().getProperty("application.model", "0"));
    }

}